import request from '@/utils/request'

// 查询计算模型配置_数据源列表
export function listModelDataSource(query) {
  return request({
    url: '/model/modelDataSource/list',
    method: 'get',
    params: query
  })
}

export function listModelDataSourceByType(type) {
  return request({
    url: '/model/modelDataSource/getByDataSourceType/' + type,
    method: 'get'
  })
}

// 查询计算模型配置_数据源详细
export function getModelDataSource(id) {
  return request({
    url: '/model/modelDataSource/' + id,
    method: 'get'
  })
}

// 保存计算模型配置_数据源
export function saveModelDataSource(data) {
  return request({
    url: '/model/modelDataSource/save',
    method: 'post',
    data: data
  })
}

// 复制计算模型配置_数据源
export function copyModelDataSource(id) {
  return request({
    url: '/model/modelDataSource/copy/' + id,
    method: 'get'
  })
}

// 删除计算模型配置_数据源
export function delModelDataSource(id) {
  return request({
    url: '/model/modelDataSource/' + id,
    method: 'delete'
  })
}

// 导出计算模型配置_数据源
export function exportModelDataSource(query) {
  return request({
    url: '/model/modelDataSource/export',
    method: 'get',
    params: query
  })
}
